List Chats
Lists chats accessible to the authenticated user. Use metadata[key]=value style query parameters to filter by metadata.
Usage
import { v0 } from 'v0-sdk'const result = await v0.chats.list()console.log(result)API Signature
Request
Query Parameters
Maximum number of chats to return (1-100, default 20).
Pagination cursor returned from a previous response.
Restrict results to chats created by this user. Must be a member of the calling scope.
Restrict results to chats associated with this Vercel project.
Filter by metadata, e.g. metadata[environment]=production. Returns chats matching all supplied key-value pairs.
Response
The chats in this page.
Unique chat identifier.
Chat title, if generated.
Visibility setting of the chat.
ISO timestamp of when the chat was created.
ISO timestamp of when the chat was last updated.
ID of the user who created the chat.
Associated Vercel project ID, if any.
User-defined key-value metadata.
Whether the caller has write access to this chat.
Cursor to fetch the next page, or null if there are no more chats.
Get Preview URL
Returns the preview URL for a chat. If the preview isn't ready, it will return null. Poll this endpoint until preview is non-null.
Restore Message
Restores the files associated with a message. Pass an assistant message, or pass a user message to restore the files from its assistant reply. The associated files must not already be the latest files in the chat.